package com.lh.singleton.type8;

//无参构造
public class Singleton1 {
	public static void main(String[] args) {

		Singleton instance = Singleton.INTANCE;
		Singleton instance2 = Singleton.INTANCE;

		System.out.println(instance.hashCode() == instance2.hashCode());
		instance.show();
	}
}

enum Singleton {

	INTANCE;

	public void show() {
		System.out.println("测试一下");
	}
}